Embedded systems are in widespread use, for example in consumer electronics (televisions, mobile phones, microwaves, cameras, etc.), cars, industrial robots and telecommunication systems. Embedded systems are made up of a combination of special-purpose hardware and software, designed to function optimally for the desired purpose. They differ from personal computer systems because the hardware and software is specifically designed for a limited number of functions, and the system must meet several constraints, for example on response time, power consumption, cost, size, weight or form factor.
The use of embedded systems is growing rapidly, as is their complexity. The design of embedded systems therefore is receiving increased attention, in particular with regards to performance and stability of the systems. An important aspect of embedded system design is determining which function(s) to implement in software and which in hardware. The main advantage of using software is that it requires limited physical space on the circuit board. Using specific hardware on the other hand usually provides a significant speedup for the feature in question. Traditionally, this determination is almost entirely done manually, which is very time consuming. Therefore, only few hardware/software partitioning options can be explored. As a result it is hard to guarantee that an optimal solution has been created that optimally satisfies the design constraints.
Even worse, existing code can often not be reused or requires significant rewrites that take almost as much effort as rewriting the code from scratch for the new platform. This is problematic in particular when the existing code has been tested against the functional requirements, because the newly written or rewritten code needs to be tested again. This is of course a waste of effort.
Partially automated techniques for creating hardware/software combinations do exist but have significant constraints. One constraint in particular is that most of these techniques require the use of “SystemC”, which may be thought of as a subset of the well-known C++ programming language that is tailored towards programming embedded systems. Standard C++ constructs can be used together with specific libraries and constructs to ease programming. However, these constructs are limited to what can be expressed using the underlying Register Transfer Level (RTL) language. Thus, they restrict programmers from using arbitrary C++ programming constructs, or from reusing existing code written for other platforms. Other languages, such as CleanC, similarly limit the programming constructs and control flow that can be used.
Again, this also hampers the reuse of existing code. Such code has to be rewritten to conform to the limitations of the chosen language, which may not even be possible in all cases. The resulting code in addition is specific to a certain hardware platform or configuration.
What is desired is a tool that can address the problem of transforming arbitrary software source code into an improved partitioning of specific hardware and software.
European patent application EP1569104A2 discloses a method and system for automatically transforming essentially sequential code into a plurality of codes which are to be executed in parallel to achieve the same or equivalent result to the sequential code. User-defined task boundaries are determined in the input code to thereby define a plurality of tasks. It is then determined if the essentially sequential application code can be separated at least one of said user-defined tasks boundaries and if so at least one code of the plurality of codes for at least one of said tasks is automatically generated. Essentially sequential code can be transformed into pipelined code, in which the pipelined code has at least two processes or tasks, one of said processes or tasks generating/producing information (data) in a first time frame, for use/consumption by another of said processes or tasks in a second (later) time frame. In pipelining, processes using different data can be executed at the same or similar time.